using System;
using System.ComponentModel;
using System.Windows.Forms;

namespace ExperimentRuleEditor
{
	public class EModel : Form
	{
		public string m_Lmodel;

		public string m_LProject;

		private string m_LProjectName;

		private int m_LPattern;

		private int m_LTarget;

		private IContainer components;

		private ComboBox cbModel;

		private Label label1;

		private Label label2;

		private ComboBox cbProject;

		private Button btOk;

		private Button btCancel;

		public string GetModelText
		{
			get
			{
				return cbModel.Text;
			}
		}

		public string GetProjectText
		{
			get
			{
				return cbProject.Text;
			}
		}

		public int GetPatternIndex
		{
			get
			{
				return cbModel.SelectedIndex;
			}
		}

		public int GetTargetIndex
		{
			get
			{
				return cbProject.SelectedIndex;
			}
		}

		public EModel(string ModelText, string ProjectText, string mProjectName, int m_Pattern, int m_Target)
		{
			InitializeComponent();
			m_LPattern = m_Pattern;
			m_LTarget = m_Target;
			m_LProjectName = mProjectName;
			if (m_LProjectName != null)
			{
				cbProject.Items.Clear();
				string[] array = m_LProjectName.Split(new string[1] { "," }, StringSplitOptions.None);
				if (array != null)
				{
					for (int i = 0; i < array.Length; i++)
					{
						if (array[i] != "N/A" && array[i] != "")
						{
							cbProject.Items.Add(array[i]);
						}
					}
				}
			}
			if (ModelText == null)
			{
				cbModel.SelectedIndex = m_LPattern;
			}
			else
			{
				cbModel.Text = ModelText;
			}
			if (ProjectText == null)
			{
				cbProject.SelectedIndex = m_Target;
			}
			else
			{
				cbProject.Text = ProjectText;
			}
		}

		private void btOk_Click(object sender, EventArgs e)
		{
			m_Lmodel = cbModel.SelectedItem.ToString();
			m_LProject = cbProject.SelectedItem.ToString();
			base.DialogResult = DialogResult.OK;
			Close();
		}

		private void btCancel_Click(object sender, EventArgs e)
		{
			base.DialogResult = DialogResult.Cancel;
			Close();
		}

		protected override void Dispose(bool disposing)
		{
			if (disposing && components != null)
			{
				components.Dispose();
			}
			base.Dispose(disposing);
		}

		private void InitializeComponent()
		{
			System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ExperimentRuleEditor.EModel));
			this.cbModel = new System.Windows.Forms.ComboBox();
			this.label1 = new System.Windows.Forms.Label();
			this.label2 = new System.Windows.Forms.Label();
			this.cbProject = new System.Windows.Forms.ComboBox();
			this.btOk = new System.Windows.Forms.Button();
			this.btCancel = new System.Windows.Forms.Button();
			base.SuspendLayout();
			this.cbModel.AccessibleDescription = null;
			this.cbModel.AccessibleName = null;
			resources.ApplyResources(this.cbModel, "cbModel");
			this.cbModel.BackgroundImage = null;
			this.cbModel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
			this.cbModel.Font = null;
			this.cbModel.FormattingEnabled = true;
			this.cbModel.Items.AddRange(new object[3]
			{
				resources.GetString("cbModel.Items"),
				resources.GetString("cbModel.Items1"),
				resources.GetString("cbModel.Items2")
			});
			this.cbModel.Name = "cbModel";
			this.label1.AccessibleDescription = null;
			this.label1.AccessibleName = null;
			resources.ApplyResources(this.label1, "label1");
			this.label1.Font = null;
			this.label1.Name = "label1";
			this.label2.AccessibleDescription = null;
			this.label2.AccessibleName = null;
			resources.ApplyResources(this.label2, "label2");
			this.label2.Font = null;
			this.label2.Name = "label2";
			this.cbProject.AccessibleDescription = null;
			this.cbProject.AccessibleName = null;
			resources.ApplyResources(this.cbProject, "cbProject");
			this.cbProject.BackgroundImage = null;
			this.cbProject.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
			this.cbProject.Font = null;
			this.cbProject.FormattingEnabled = true;
			this.cbProject.Items.AddRange(new object[4]
			{
				resources.GetString("cbProject.Items"),
				resources.GetString("cbProject.Items1"),
				resources.GetString("cbProject.Items2"),
				resources.GetString("cbProject.Items3")
			});
			this.cbProject.Name = "cbProject";
			this.btOk.AccessibleDescription = null;
			this.btOk.AccessibleName = null;
			resources.ApplyResources(this.btOk, "btOk");
			this.btOk.BackgroundImage = null;
			this.btOk.Font = null;
			this.btOk.Name = "btOk";
			this.btOk.UseVisualStyleBackColor = true;
			this.btOk.Click += new System.EventHandler(btOk_Click);
			this.btCancel.AccessibleDescription = null;
			this.btCancel.AccessibleName = null;
			resources.ApplyResources(this.btCancel, "btCancel");
			this.btCancel.BackgroundImage = null;
			this.btCancel.Font = null;
			this.btCancel.Name = "btCancel";
			this.btCancel.UseVisualStyleBackColor = true;
			this.btCancel.Click += new System.EventHandler(btCancel_Click);
			base.AccessibleDescription = null;
			base.AccessibleName = null;
			resources.ApplyResources(this, "$this");
			base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
			this.BackgroundImage = null;
			base.Controls.Add(this.btCancel);
			base.Controls.Add(this.btOk);
			base.Controls.Add(this.label2);
			base.Controls.Add(this.cbProject);
			base.Controls.Add(this.label1);
			base.Controls.Add(this.cbModel);
			this.Font = null;
			base.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
			base.Icon = null;
			base.MaximizeBox = false;
			base.MinimizeBox = false;
			base.Name = "EModel";
			base.ShowIcon = false;
			base.ShowInTaskbar = false;
			base.ResumeLayout(false);
			base.PerformLayout();
		}
	}
}
